<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>xmlsec: XML Security Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="XML Security Library Reference Manual">
<link rel="up" href="xmlsec-ref.html" title="XML Security Core Library API Reference.">
<link rel="prev" href="xmlsec-xmlenc.html" title="xmlenc">
<link rel="next" href="xmlsec-xmltree.html" title="xmltree">
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css">
table.CALSTABLE > tbody > tr:nth-child(1) > td:nth-child(1) {
    width: 20em;
}
.synopsis, .classsynopsis {
    background: #eeeeee;
    border: solid 1px #aaaaaa;
}
.programlisting {
    background: #eeeeee;
    border: solid 1px #000000;
}
.navigation {
    background: #eeeeee;
    border: solid 1px #000000;
}
.navigation a {
    color: initial;
}
.navigation a:visited {
    color: initial;
}
</style>
<style type="text/css">
table.CALSTABLE > tbody > tr:nth-child(1) > td:nth-child(1) {
    width: 20em;
}
.synopsis, .classsynopsis {
    background: #eeeeee;
    border: solid 1px #aaaaaa;
}
.programlisting {
    background: #eeeeee;
    border: solid 1px #000000;
}
.navigation {
    background: #eeeeee;
    border: solid 1px #000000;
}
.navigation a {
    color: initial;
}
.navigation a:visited {
    color: initial;
}
</style>
</head>
<body><table width="100%" valign="top"><tr valign="top">
<td valign="top" align="left" width="210">
<img src="../images/logo.gif" alt="XML Security Library" border="0"><p></p>
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="../download.html">Download</a></li>
<li><a href="../news.html">News</a></li>
<li><a href="../documentation.html">Documentation</a></li>
<ul>
<li><a href="../faq.html">FAQ</a></li>
<li><a href="../api/xmlsec-notes.html">Tutorial</a></li>
<li><a href="../api/xmlsec-reference.html">API reference</a></li>
<li><a href="../api/xmlsec-examples.html">Examples</a></li>
</ul>
<li><a href="../xmldsig.html">XML Digital Signature</a></li>
<ul><li><a href="http://www.aleksey.com/xmlsec/xmldsig-verifier.html">Online Verifier</a></li></ul>
<li><a href="../xmlenc.html">XML Encryption</a></li>
<li><a href="../c14n.html">XML Canonicalization</a></li>
<li><a href="../bugs.html">Reporting Bugs</a></li>
<li><a href="http://www.aleksey.com/pipermail/xmlsec">Mailing list</a></li>
<li><a href="../related.html">Related</a></li>
<li><a href="../authors.html">Authors</a></li>
</ul>
<table width="100%">
<tr>
<td width="15"></td>
<td><a href="http://xmlsoft.org/"><img src="../images/libxml2-logo.png" alt="LibXML2" border="0"></a></td>
</tr>
<tr>
<td width="15"></td>
<td><a href="http://xmlsoft.org/XSLT"><img src="../images/libxslt-logo.png" alt="LibXSLT" border="0"></a></td>
</tr>
<tr>
<td width="15"></td>
<td><a href="http://www.openssl.org/"><img src="../images/openssl-logo.png" alt="OpenSSL" border="0"></a></td>
</tr>
<!--Links - start--><!--Links - end-->
</table>
</td>
<td valign="top"><table width="100%" valign="top"><tr><td valign="top" align="left" id="xmlsecContent">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#xmlsec-xmlsec.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="xmlsec-ref.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="xmlsec-xmlenc.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="xmlsec-xmltree.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="xmlsec-xmlsec"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="xmlsec-xmlsec.top_of_page"></a>xmlsec</span></h2>
<p>xmlsec &#8212; Utility functions.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="xmlsec-xmlsec.stability-level"></a><h2>Stability Level</h2>
<a href="http://foldoc.org/Stable"><span class="acronym">Stable</span></a>, unless otherwise indicated
</div>
<div class="refsect1">
<a name="xmlsec-xmlsec.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="xmlsec-xmlsec.html#XMLSEC-SIZE-BAD-CAST:CAPS" title="XMLSEC_SIZE_BAD_CAST()">XMLSEC_SIZE_BAD_CAST</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<font><span class="returnvalue">int</span></font>
</td>
<td class="function_name">
<a class="link" href="xmlsec-xmlsec.html#xmlSecInit" title="xmlSecInit ()">xmlSecInit</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<font><span class="returnvalue">int</span></font>
</td>
<td class="function_name">
<a class="link" href="xmlsec-xmlsec.html#xmlSecShutdown" title="xmlSecShutdown ()">xmlSecShutdown</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <font><span class="returnvalue">xmlChar</span></font> *
</td>
<td class="function_name">
<a class="link" href="xmlsec-xmlsec.html#xmlSecGetDefaultCrypto" title="xmlSecGetDefaultCrypto ()">xmlSecGetDefaultCrypto</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<font><span class="returnvalue">void</span></font>
</td>
<td class="function_name">
<a class="link" href="xmlsec-xmlsec.html#xmlSecSetExternalEntityLoader" title="xmlSecSetExternalEntityLoader ()">xmlSecSetExternalEntityLoader</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="xmlsec-xmlsec.html#xmlSecCheckVersionExact" title="xmlSecCheckVersionExact">xmlSecCheckVersionExact</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="xmlsec-xmlsec.html#xmlSecCheckVersion" title="xmlSecCheckVersion">xmlSecCheckVersion</a></td>
</tr>
<tr>
<td class="function_type">
<font><span class="returnvalue">int</span></font>
</td>
<td class="function_name">
<a class="link" href="xmlsec-xmlsec.html#xmlSecCheckVersionExt" title="xmlSecCheckVersionExt ()">xmlSecCheckVersionExt</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="xmlsec-xmlsec.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td class="typedef_keyword">typedef</td>
<td class="function_name"><font>xmlSecPtr</font></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="xmlsec-xmlsec.html#xmlSecSize" title="xmlSecSize">xmlSecSize</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="xmlsec-xmlsec.html#xmlSecByte" title="xmlSecByte">xmlSecByte</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="xmlsec-xmlsec.html#XMLSEC-CRYPTO:CAPS" title="XMLSEC_CRYPTO">XMLSEC_CRYPTO</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="xmlsec-xmlsec.html#XMLSEC-DEPRECATED:CAPS" title="XMLSEC_DEPRECATED">XMLSEC_DEPRECATED</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="xmlsec-xmlsec.html#xmlSecCheckVersionMode" title="enum xmlSecCheckVersionMode">xmlSecCheckVersionMode</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="xmlsec-xmlsec.description"></a><h2>Description</h2>
<p></p>
</div>
<div class="refsect1">
<a name="xmlsec-xmlsec.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="XMLSEC-SIZE-BAD-CAST:CAPS"></a><h3>XMLSEC_SIZE_BAD_CAST()</h3>
<pre class="programlisting">#define XMLSEC_SIZE_BAD_CAST(val)               ((xmlSecSize)(val))
</pre>
<p>Bad cast to xmlSecSize</p>
<div class="refsect3">
<a name="XMLSEC-SIZE-BAD-CAST.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>val</p></td>
<td class="parameter_description"><p>the value to cast</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="xmlSecInit"></a><h3>xmlSecInit ()</h3>
<pre class="programlisting"><font><span class="returnvalue">int</span></font>
xmlSecInit (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Initializes XML Security Library. The depended libraries
(LibXML and LibXSLT) must be initialized before.</p>
<div class="refsect3">
<a name="xmlSecInit.returns"></a><h4>Returns</h4>
<p> 0 on success or a negative value otherwise.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="xmlSecShutdown"></a><h3>xmlSecShutdown ()</h3>
<pre class="programlisting"><font><span class="returnvalue">int</span></font>
xmlSecShutdown (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Gets the default crypto engine ("openssl", "nss", etc.) for the XML Security Library.</p>
<div class="refsect3">
<a name="xmlSecShutdown.returns"></a><h4>Returns</h4>
<p> the default crypto engine ("openssl", "nss", etc.).</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="xmlSecGetDefaultCrypto"></a><h3>xmlSecGetDefaultCrypto ()</h3>
<pre class="programlisting">const <font><span class="returnvalue">xmlChar</span></font> *
xmlSecGetDefaultCrypto (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="xmlSecSetExternalEntityLoader"></a><h3>xmlSecSetExternalEntityLoader ()</h3>
<pre class="programlisting"><font><span class="returnvalue">void</span></font>
xmlSecSetExternalEntityLoader (<em class="parameter"><code><font><span class="type">xmlExternalEntityLoader</span></font> Param1</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="xmlSecCheckVersionExact"></a><h3>xmlSecCheckVersionExact</h3>
<pre class="programlisting">#define             xmlSecCheckVersionExact()</pre>
<p>Macro. Returns 1 if the loaded xmlsec library version exactly matches
the one used to compile the caller, 0 if it does not or a negative
value if an error occurs.</p>
</div>
<hr>
<div class="refsect2">
<a name="xmlSecCheckVersion"></a><h3>xmlSecCheckVersion</h3>
<pre class="programlisting">#define             xmlSecCheckVersion()</pre>
<p>Macro. Returns 1 if the loaded xmlsec library version ABI compatible with
the one used to compile the caller, 0 if it does not or a negative
value if an error occurs.</p>
</div>
<hr>
<div class="refsect2">
<a name="xmlSecCheckVersionExt"></a><h3>xmlSecCheckVersionExt ()</h3>
<pre class="programlisting"><font><span class="returnvalue">int</span></font>
xmlSecCheckVersionExt (<em class="parameter"><code><font><span class="type">int</span></font> major</code></em>,
                       <em class="parameter"><code><font><span class="type">int</span></font> minor</code></em>,
                       <em class="parameter"><code><font><span class="type">int</span></font> subminor</code></em>,
                       <em class="parameter"><code><a class="link" href="xmlsec-xmlsec.html#xmlSecCheckVersionMode" title="enum xmlSecCheckVersionMode"><span class="type">xmlSecCheckVersionMode</span></a> mode</code></em>);</pre>
<p>Checks if the loaded version of xmlsec library could be used.</p>
<div class="refsect3">
<a name="xmlSecCheckVersionExt.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>major</p></td>
<td class="parameter_description"><p>the major version number.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>minor</p></td>
<td class="parameter_description"><p>the minor version number.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>subminor</p></td>
<td class="parameter_description"><p>the subminor version number.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mode</p></td>
<td class="parameter_description"><p>the version check mode.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="xmlSecCheckVersionExt.returns"></a><h4>Returns</h4>
<p> 1 if the loaded xmlsec library version is OK to use
0 if it is not or a negative value if an error occurs.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="xmlsec-xmlsec.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="xmlSecPtr"></a><h3>xmlSecPtr</h3>
<pre class="programlisting">typedef void*                                   xmlSecPtr;
</pre>
<p>Void pointer.</p>
</div>
<hr>
<div class="refsect2">
<a name="xmlSecSize"></a><h3>xmlSecSize</h3>
<pre class="programlisting">#define xmlSecSize                              unsigned int
</pre>
<p>Size of something. Should be typedef instead of define
but it will break ABI (todo).</p>
</div>
<hr>
<div class="refsect2">
<a name="xmlSecByte"></a><h3>xmlSecByte</h3>
<pre class="programlisting">#define xmlSecByte                              unsigned char
</pre>
<p>One byte. Should be typedef instead of define
but it will break ABI (todo).</p>
</div>
<hr>
<div class="refsect2">
<a name="XMLSEC-CRYPTO:CAPS"></a><h3>XMLSEC_CRYPTO</h3>
<pre class="programlisting">#define XMLSEC_CRYPTO                          (xmlSecGetDefaultCrypto())
</pre>
<p>Macro. Deprecated. Defined for backward compatibility only. Do not use
in your code and use <a class="link" href="xmlsec-xmlsec.html#xmlSecGetDefaultCrypto" title="xmlSecGetDefaultCrypto ()"><code class="function">xmlSecGetDefaultCrypto()</code></a> function instead.</p>
<p>Returns the default crypto engine.</p>
</div>
<hr>
<div class="refsect2">
<a name="XMLSEC-DEPRECATED:CAPS"></a><h3>XMLSEC_DEPRECATED</h3>
<pre class="programlisting">#define XMLSEC_DEPRECATED __attribute__((deprecated))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="xmlSecCheckVersionMode"></a><h3>enum xmlSecCheckVersionMode</h3>
<p>The xmlsec library version mode.</p>
<div class="refsect3">
<a name="xmlSecCheckVersionMode.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="xmlSecCheckVersionExactMatch"></a>xmlSecCheckVersionExactMatch</p></td>
<td class="enum_member_description"><p>the version should match exactly.</p></td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="xmlSecCheckVersionABICompatible"></a>xmlSecCheckVersionABICompatible</p></td>
<td class="enum_member_description"><p>the version should be ABI compatible.</p></td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.27</div>
</td></tr></table></td>
</tr></table></body>
</html>
